<include file="Public:header" />
<include file="Public:left" />

<style>
    td{text-align:center;}
</style>
<section>
    <div class="page_title">
        <h2 class="fl">项目列表</h2>
        <form action="" >
            关键字
            <input type="text" class="page_title_input" name="keyword" placeholder="可搜索名称" value="{$keyword?$keyword:''}">

            <input  class="page_title_submit" type="submit" value="搜索">
        </form>
        <a class="fr" href="{:url('Project/add')}">添加项目</a>
    </div>
    <table class="table">
        <tr>
            <!--<th style="width: 50px;">ID</th>-->
            <th>项目</th>
            <th>编号</th>
            <th>开始时间</th><th>到期时间</th>
            <th>预期完成时间</th>
            <th>总负责人</th>
            <th>负责人联系方式</th>
            <th style="width:190px;">操作</th>
        </tr>
        <volist name="article_result" id="vo">
            <tr>
                <!--<td>{$vo.id}</td>-->
                <td>{$vo.title}</td>
                <td>{$vo.number}</td>
                <td>{$vo.start_time|date="Y-m-d H:i:s",###}</th><th>{$vo.finish_time|date="Y-m-d H:i:s",###}</td>
                <td>{$vo.expect_time|date="Y-m-d H:i:s",###}</td>
                <td>
                    {$vo.user}
                </td>
                <td>{$vo.mobile}</td>
                <td>
                    <a href="{:url('Project/info',array('id'=>$vo['id']))}" class="inner_btn">查看</a>
                    <a href="{:url('Project/edit',array('id'=>$vo['id']))}" class="inner_btn">编辑</a>
                    <a href="javascript:void(0)" id="{$vo['id']}"  class="inner_btn dynamic_del" >删除</a>
                </td>
            </tr>
        </volist>
    </table>

    {$page}
</section>
<!--tabStyle-->
<script>
    //    删除新闻
    $('.dynamic_del').click(function(){
        var id = $(this).attr('id');
        layer.confirm('删除数据无法恢复，并且会影响用户数据，确定删除？', {
            btn: ['确定', '取消']
        }, function() {
            $.post("{:url('Project/delete')}", {id: id}, function (result) {

                if (result.code == '0') {
                    layer.alert(result.msg);
                } else {
                    layer.alert(result.msg, {
                                btn: ['确定']
                            },
                            function (index, item) {
                                //layer.close(index);
                                location.reload();
                            });
                }
            });
        });
    });
</script>
</div>
</section>
</body>
</html>
